home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
By Popular Request 2.0
/
By Popular Request 2.0 (Arsenal Computer).ISO
/
amiga_1
/
amytemp.lha
/
AmigaTemp
/
ARexxScr
/
ListTemp.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-05-20
|
2KB
|
49 lines
/* AmigaTemp V1.1 ARexx */
/* Lists names and temperatures for all connected sensors */
/* Start */
st = Show(P, 'AmigaTemp') /* Is program running? */
if st == 0 then /* No... */
do
Address COMMAND
'CCT1.1:CCT CX_POPUP=NO' /* Start AmigaTemp. Don't POPUP */
if rc > 0 then do /* Program not found... */
Say "Can't start AmigaTemp"
exit
end
do 2 while ~Show(P, 'AmigaTemp') /* Wait until program has started or at least 20 sek */
'waitforport AmigaTemp'
end
if ~Show(P, 'AmigaTemp') then do /* Something is wrong... */
Say "Can't start AmigaTemp"
exit
end
end
/* Main */
Options RESULTS /* Retrive the string result field */
Address 'AmigaTemp' /* Portname for AmigaTemp (Case sensitive) */
'Version'; Say result /* Write name and version */
'NumSensor'; numsensor = result /* Number Of Sensors */
Say 'Name Temp'
Say '------------------------'
do i=1 to numsensor
'Name' i /* Name of sensor */
If rc == 0 then /* rc == 0 if sensor is connected */
do
name = left(result, 18) /* Name of sensor */
'Temp' i; temp = result /* Current temperature */
Say name || temp; /* Write... */
end
end i
if st == 0 then 'Quit' /* Quit AmigaTemp if we started it */